<?php
/**
 * Created by PhpStorm.
 * User: zhangjincheng
 * Date: 17-3-10
 * Time: 下午5:58
 */
//是否启用consul（普通模式）
$config['consul']['enable'] = false;
//是否启用docker扩展模式，指定docker环境变量替换相应的配置项，支持配置定义service-tag
$config['consul']['extent_mode'] = false;
//数据中心配置
$config['consul']['datacenter'] = 'dc1';
//开放给本地
$config['consul']['client_addr'] = '127.0.0.1';
//指定Consul-Agent连接：Add by hb on 2017-12-26
$config['consul']['agent_addr'] = '127.0.0.1';
//服务器名称，同种服务应该设置同样的名称，用于leader选举
$config['consul']['leader_service_name'] = 'Test';
//node的名字，每一个都必须不一样,也可以为空自动填充主机名，扩展模式下，可通过docker环境变量 SD_NODE_NAME 来指定
//$config['consul']['node_name'] = 'SD-1';
//consul的data_dir默认放在临时文件下
$config['consul']['data_dir'] = "/tmp/consul";
//consul join地址，可以是集群的任何一个，或者多个
$config['consul']['start_join'] = ["192.168.8.85"];
//服务绑定IP，如果没有指定，则使用本地网卡设备绑定的IP；扩展模式下，可通过docker环境变量 SD_SERVICE_BIND_ADDR 来指定
//$config['consul']['bind_addr'] = "192.168.99.100";
//本地网卡设备
$config['consul']['bind_net_dev'] = "eth0";
//监控服务
$config['consul']['watches'] = ['MathService', 'TestController'];
//发布服务
$config['consul']['services'] = ['MathService:8081', 'TestController:8081'];
//定义服务tag，必须设置['consul']['extent_mode'] = true，才能生效
$config['consul']['MathService:8081']['tag'] = "Desc:数学计算API服务, Author:hb@wsd, Ver:1.0.0, PubTime:2017-12-22 11:26:00";
//是否开启TCP集群,启动consul才有用
$config['cluster']['enable'] = false;
//TCP集群端口
$config['cluster']['port'] = 9999;
return $config;